When you say menu things, do you mean access into the RetroArch menu when missing an X or Y button?
You can remap the controllers configs inside /opt/RetroPie/configs/all/ (think it's called joysticks or joypads) then edit the lines like "input_toggle_menu" to the a or b button so you can access that?
Assuming you only have a couple of controllers doing it once or twice would solve that. If you are mapping loads on emulationstation you could change the RetroArch.sh mapping file so when you map something in emulationstation it maps your chosen button to those hotkeys. For example button b being a reset hotkey, for button mashers that's a nightmare for me so I usually get rid of that mapping for the entire emulationstation -> Retroarch.sh mapping file.